//
//  CheckInfoModel.m
//  掌上宏力
//
//  Created by admin on 2017/5/15.
//  Copyright © 2017年 admin. All rights reserved.
//

#import "CheckInfoModel.h"

@implementation CheckInfoModel
/*
 \"EXAM_NO\": \"5251831\",
 \"NAME\": \"陈雪勇\",
 \"SEX\": \"男\",
 \"DATE_OF_BIRTH\": \"1983/12/150: 00: 00\",
 \"EXAM_SUB_CLASS\": \"彩超\",
 \"CLIN_SYMP\": \"2月前出现咽痛不适，曾有发热，体温37.5摄氏度，无咳嗽咳痰。\",
 \"PHYS_SIGN\": \"双肺呼吸音粗糙，未闻及干湿性罗音，心率80次\\/分，律齐，各瓣膜听诊未闻及病理性杂音，服软，无压痛，肝脾肋缘下未触及。\",
 \"REQ_DATE_TIME\": \"2016/11/68: 27: 38\",
 \"REQ_PHYSICIAN\": \"闫文丽\”,  医生
 \"REPORT_DATE_TIME\": \"2016/11/68: 56: 14\",
 \"REPORTER\": \"李晓玲\",    操作人
 \"COSTS\": 60,
 \"CHARGES\": 60,
 \"AGE\": 32,


@property (nonatomic,copy) NSString *examNo;

@property (nonatomic,copy) NSString *name;
@property (nonatomic,copy) NSString *sex;
@property (nonatomic,copy) NSString *birth;
@property (nonatomic,copy) NSString *age;

@property (nonatomic,copy) NSString *exam_date;
@property (nonatomic,copy) NSString *exam_name;
@property (nonatomic,copy) NSString *clin_symp;
@property (nonatomic,copy) NSString *phys_sign;
@property (nonatomic,copy) NSString *physician;
@property (nonatomic,copy) NSString *reporter;

@property (nonatomic,copy) NSString *costs;
  */
-(instancetype)initWithDic:(NSDictionary *)dic{
    if (self = [super init]) {
        self.examNo = dic[@"EXAM_NO"];
        self.name = dic[@"NAME"];
        self.sex = dic[@"SEX"];
        NSString *birthStr = dic[@"DATE_OF_BIRTH"];
        self.birth = [birthStr substringToIndex:birthStr.length-8];
        
        self.age = [NSString stringWithFormat:@"%@",dic[@"AGE"]];
        NSString *dateStr = dic[@"REQ_DATE_TIME"];
        self.exam_date = [dateStr substringToIndex:dateStr.length-8];
        self.exam_name = dic[@"EXAM_CLASS"];
        self.exam_sub_name = dic[@"EXAM_SUB_CLASS"];
        self.clin_symp = dic[@"CLIN_SYMP"];
        self.phys_sign = dic[@"PHYS_SIGN"];
        self.physician = dic[@"REQ_PHYSICIAN"];
        self.reporter = dic[@"REPORTER"];
        self.costs = [NSString stringWithFormat:@"%@",dic[@"COSTS"]];
    }
    return self;
}
+(CheckInfoModel *)checkInfoWithDic:(NSDictionary *)dic{
    return [[self alloc] initWithDic:dic];
}
@end
